IF(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
	ADD_DEFINITIONS(-Du_short=uint16_t)

	LINK_DIRECTORIES(
		${LINK_DIRECTORIES}
		/opt/local/lib
		/usr/lib
	)

	IF(${TORRENT} MATCHES ON)
		SET(MACOSX_EXTRAS 
			${MACOSX_EXTRAS} 
			libtorrent/libtorrent.dylib
		)
	ENDIF(${TORRENT} MATCHES ON)
	
	SET(GUI_TYPE MACOSX_BUNDLE)
	SET(MACOSX_BUNDLE_INFO_STRING "")
	SET(MACOSX_BUNDLE_ICON_FILE "${CMAKE_SOURCE_DIR}/contrib/ddps2.icns")
	SET(MACOSX_BUNDLE_GUI_IDENTIFIER "")
	SET(MACOSX_BUNDLE_LONG_VERSION_STRING "")
	SET(MACOSX_BUNDLE_BUNDLE_NAME "${PROJECT_NAME}")
	SET(MACOSX_BUNDLE_SHORT_VERSION_STRING "")
	SET(MACOSX_BUNDLE_BUNDLE_VERSION "${DDPS_VERSION}")
	SET(MACOSX_BUNDLE_COPYRIGHT 
		"Copyright 2008 Sean Nelson, Corey Brown, Joshua Barron, Adam Troemne")
ENDIF(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")